* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.logo h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 600;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.logo p {
    font-size: 1.1rem;
    color: #cccccc;
    font-weight: 300;
    letter-spacing: 2px;
}

.film-strip {
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #ffd700 20%, 
        #ffd700 80%, 
        transparent 100%);
    margin: 20px auto;
    max-width: 400px;
    border-radius: 2px;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    align-items: start;
}

/* Controls Panel */
.controls-panel {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.control-section {
    margin-bottom: 30px;
}

.control-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #ffd700;
    font-weight: 600;
}

/* Genre Buttons */
.genre-grid {
    display: none;
}

.genre-btn {
    display: none;
}

/* Styled Selects */
.styled-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.styled-select:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.styled-select option {
    background: #1a1a2e;
    color: #ffffff;
}

/* Generation Mode */
.generation-mode {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mode-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.mode-radio:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mode-radio input[type="radio"] {
    margin-right: 10px;
    accent-color: #ffd700;
}

.mode-radio span {
    font-size: 0.95rem;
    color: #ffffff;
}

/* Effects Grid */
.effects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.effect-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.effect-checkbox:hover {
    background: rgba(255, 255, 255, 0.05);
}

.effect-checkbox input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #ffd700;
}

/* Camera Controls */
.camera-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Atmosphere Controls */
.atmosphere-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Scene Elements */
.scene-elements {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Advanced Controls */
.advanced-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.variance-toggle,
.experimental-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.variance-toggle:hover,
.experimental-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.variance-toggle input[type="checkbox"],
.experimental-toggle input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #ffd700;
}

.variance-toggle span,
.experimental-toggle span {
    font-size: 0.95rem;
    color: #ffffff;
}

/* Prompt Controls */
.prompt-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auto-generate-btn {
    padding: 10px 16px;
    background: linear-gradient(45deg, #4a90e2, #5ba3f5);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.auto-generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.auto-generate-btn:active {
    transform: translateY(0);
}

.auto-generate-btn.loading .btn-text {
    opacity: 0;
}

.auto-generate-btn.loading .btn-loader {
    opacity: 1;
}

.auto-generate-btn .btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Output Controls */
.output-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.9rem;
    color: #cccccc;
}

.seed-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.seed-toggle input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #ffd700;
}

#seedValue {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#seedValue:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#seedValue:focus {
    outline: none;
    border-color: #ffd700;
}

/* Scene Prompt */
#scenePrompt {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
}

#scenePrompt:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

/* Characteristics Grid */
.characteristics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    border: none;
    border-radius: 12px;
    color: #000000;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.4);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn.loading .btn-text {
    opacity: 0;
}

.generate-btn.loading .btn-loader {
    opacity: 1;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-top: 3px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Preview Panel */
.preview-panel {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    min-height: 600px;
}

.preview-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.preview-area {
    flex: 1;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.placeholder {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.camera-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.7;
}

.placeholder p {
    font-size: 1.1rem;
    font-weight: 300;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Download Section */
.download-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.download-section h4 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.download-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.download-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.download-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 350px 1fr;
        gap: 30px;
    }
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .controls-panel {
        order: 2;
    }
    
    .preview-panel {
        order: 1;
    }
}

@media (max-width: 600px) {
    .app-container {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .genre-grid {
        display: none;
    }
    
    .effects-grid {
        grid-template-columns: 1fr;
    }
    
    .download-buttons {
        flex-direction: column;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Glowing effect for active elements */
.glow {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}